package com.mzkj.wanjulaile.mobile.api.modules.coupon.mapper;

import com.mzkj.wanjulaile.mobile.api.common.persistence.CrudMapper;
import com.mzkj.wanjulaile.mobile.api.modules.address.entity.Address;
import com.mzkj.wanjulaile.mobile.api.modules.coupon.entity.AccountCoupon;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by wangxw on 16/7/26.
 */
@Repository
public interface AccountCouponMapper extends CrudMapper<AccountCoupon> {

    List<AccountCoupon> getCouponsByAccountId(AccountCoupon accountCoupon);

    int couponCount(AccountCoupon accountCoupon);

    AccountCoupon getById(AccountCoupon accountCoupon);

    void couponExpried(@Param("accountCouponIds")List<String> ids);

    List<String> getExpireDateCoupon();
    List<AccountCoupon> getUnUseCoupon(AccountCoupon accountCoupon);

    List<AccountCoupon> getUseCoupon(AccountCoupon accountCoupon);

    List<AccountCoupon> newFindList(AccountCoupon accountCoupon);
}
